package com.csnj.core.dao;
;
import com.csnj.core.entity.SysMenu;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SysMenuMapper extends Mapper<SysMenu> {
    List<SysMenu> selectMenuByAuthorityId(@Param("authorityId") Integer authorityId, @Param("authorityType") String authorityType);

    /**
     * 根据用户和组的权限关系查找用户可访问菜单
     * @param userId
     * @return
     */
    List<SysMenu> selectAuthorityMenuByUserId(@Param("userId") int userId);

    /**
     * 根据用户和组的权限关系查找用户可访问的系统
     * @param userId
     * @return
     */
    List<SysMenu> selectAuthoritySystemByUserId(@Param("userId") int userId);

}